import axios from '@/libs/request/axios'
import QS from 'qs';

export const getCase = (caseType,contractBusiness) => {
    return axios.request({
        url: '/contractManage/caseType/getCase',
        data: QS.stringify({caseType:caseType,contractBusiness:contractBusiness},{arrayFormat: 'repeat'}),
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}

export const saveCase = (v) => {
    return axios.request({
        url: '/contractManage/caseType/saveCase',
        data: v,
        method: 'post'
    })
}

export const editCase = (v) => {
    return axios.request({
        url: '/contractManage/caseType/editCase',
        data: v,
        method: 'post'
    })
}

export const deleteCase = (id) => {
    return axios.request({
        url: '/contractManage/caseType/deleteCase',
        data: QS.stringify({id:id},{arrayFormat: 'repeat'}),
        method: 'delete',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
    })
}

export const pageQuerySimpleUserInfo = (data) => {
    return axios.request({
        url: '/admin/user/pageQuerySimpleUserInfo',
        data,
        method: 'post'
    })
}